# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pwnloris
pkgver=14.7ad1486
pkgrel=1
groups=('blackarch' 'blackarch-dos')
pkgdesc='An improved slowloris DOS tool which keeps attacking until the server starts getting exhausted.'
arch=('any')
url='https://github.com/h0ussni/pwnloris'
license=('GPL3')
depends=('python' 'python-argparse' 'python-pysocks')
makedepends=('git')
source=("git+https://github.com/h0ussni/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

